home *** CD-ROM | disk | FTP | other *** search
- /*
- (C) 1995-96 AROS - The Amiga Replacement OS
- $Id: setowner.c,v 1.3 1996/09/11 13:03:08 digulla Exp $
- $Log: setowner.c,v $
- Revision 1.3 1996/09/11 13:03:08 digulla
- Wrote functions (M. Fleischer)
-
- Desc:
- Lang: english
- */
- #include <clib/exec_protos.h>
- #include <dos/dosextens.h>
- #include <dos/filesystem.h>
- #include <clib/dos_protos.h>
- #include "dos_intern.h"
-
- /*****************************************************************************
-
- NAME */
- #include <clib/dos_protos.h>
-
- __AROS_LH2(BOOL, SetOwner,
-
- /* SYNOPSIS */
- __AROS_LHA(STRPTR, name, D1),
- __AROS_LHA(ULONG, owner_info, D2),
-
- /* LOCATION */
- struct DosLibrary *, DOSBase, 166, Dos)
-
- /* FUNCTION
-
- INPUTS
- name - name of the file
- owner_info - (UID<<16)+GID
-
- RESULT
- !=0 if all went well, 0 else. IoErr() gives additional
- information in that case.
-
- NOTES
-
- EXAMPLE
-
- BUGS
-
- SEE ALSO
-
- INTERNALS
-
- HISTORY
- 29-10-95 digulla automatically created from
- dos_lib.fd and clib/dos_protos.h
-
- *****************************************************************************/
- {
- __AROS_FUNC_INIT
- __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
-
- /* Get pointer to process structure */
- struct Process *me=(struct Process *)FindTask(NULL);
-
- /* Get pointer to I/O request. Use stackspace for now. */
- struct IOFileSys io,*iofs=&io;
-
- /* Prepare I/O request. */
- iofs->IOFS.io_Message.mn_Node.ln_Type=NT_REPLYMSG;
- iofs->IOFS.io_Message.mn_ReplyPort =&me->pr_MsgPort;
- iofs->IOFS.io_Message.mn_Length =sizeof(struct IOFileSys);
- iofs->IOFS.io_Flags=0;
- iofs->IOFS.io_Command=FSA_SET_OWNER;
- /* io_Args[0] is the name which is set by DoName(). */
- iofs->io_Args[1]=owner_info>>16;
- iofs->io_Args[2]=owner_info&0xffff;
- return !DoName(iofs,name);
- __AROS_FUNC_EXIT
- } /* SetOwner */
-